package process0.ast;

import java.util.Vector;

import process0.visitor.Visitor;

public class Process implements Node {
	private String id;
	private Vector<Workflow> workflows = new Vector<Workflow>();
	private Timeline timeline = null;

	public Process(String id) {
		super();
		this.id = id;
	}

	public Timeline getTimeline() {
		return timeline;
	}

	public void setTimeline(Timeline timeline) {
		this.timeline = timeline;
	}

	public void addWorkflow(Workflow workflow) {
		if (workflow != null) {
			workflows.add(workflow);
		}
	}

	public Vector<Workflow> getWorkflows() {
		return workflows;
	}

	// public String toStringProcess() {
	// String out = this.getId();
	// for (Workflow wf : workflows) {
	// out += "\n" + wf.toWorkflowString();
	// }
	// return out;
	// }

	public String getId() {
		return id;
	}

	public void setId(String id) {
		this.id = id;
	}

	public void accept(Visitor visitor) {
		visitor.visit(this);
	}

}
